package bite20220325;

class MyDate{
    public int year;
    public int month;
    public int day;

//    public void setDate(int year,int month,int day){//有个隐式的 MyDate this
//        this.year = year;
//        this.month = month;
//        this.day = day;//赋值给了局部变量
//    }

    public void printDate(){
        System.out.println("year:"+year+"month:"+month+"day:"+day);
    }

    public MyDate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

}

public class Test1 {


    public static void main(String[] args) {

    }
}
